package com.ovopark.organize.server.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ovopark.organize.server.model.entity.FranchiseesRegistrationFollow;
import com.ovopark.organize.server.model.vo.FranchiseesRegistrationFollowVo;
import com.ovopark.organize.server.model.vo.SimpleDateVo;

import java.io.IOException;
import java.text.ParseException;
import java.util.List;
import java.util.Map;

/**
 * @Description:
 * @Author:zll
 * @Date:
 */
public interface FranchiseesRegistrationFollowService {


    FranchiseesRegistrationFollow saveOrUpdateVo(FranchiseesRegistrationFollow follow);

    FranchiseesRegistrationFollow getFollowById(Integer id);

    void deleteFollowById(Integer id);

    IPage<FranchiseesRegistrationFollow> getRegistrationFollowByRegistrationId(Page<FranchiseesRegistrationFollow> page, Integer registrationId,Integer followUpPlan,Integer followUpPlanStatus);

    FranchiseesRegistrationFollow saveOrUpdateFollow(FranchiseesRegistrationFollow vo);


    List<SimpleDateVo> getNextFranchiseesRegistrationTime(List<Integer> registrationId, Integer groupId);

    List<Integer> getRegistrationIdByTime(Integer groupId, List<Integer> registrationIds, String startFlowDate, String endFlowDate);

    Integer getFollowNumByRegistrationId(Integer registrationId);

    FranchiseesRegistrationFollowVo saveFollowvo(FranchiseesRegistrationFollowVo vo) throws ParseException, IOException;

    List<FranchiseesRegistrationFollow> getRegistrationFollows(Integer registrationId, Integer followUpPlan, Integer followUpPlanStatus);

    /**
     * 跟进计划 定时更新 计划状态
     * @param groupId
     */
    void synChangeRegistrationFollowStatus(Integer groupId);


    List<Integer> findAllGroupIds();




    List<FranchiseesRegistrationFollow>  getFollowByRegistrationId(Integer registrationId,Integer followUpPlan,Boolean filterClose);

    void updateFollowUpPlanStatusByRegistrationId(Integer groupId, List<Integer> registrationIds, Integer userId, Integer followUpStatusCancel, String followUpPlanReason);

    Map<Integer, FranchiseesRegistrationFollow> getFinalFollowUserByRegistrationId(Integer groupId, List<Integer> ids);

    List<FranchiseesRegistrationFollow> getRegistrationFollowsByPlanId(Integer franchiseesRegistrationId, Integer planId);

    FranchiseesRegistrationFollowVo saveNewFollowvo(FranchiseesRegistrationFollowVo vo) throws ParseException;

    Boolean deleteNewFollowById(Integer id, Integer groupId);
}
